Skip to content

Conversation

@ronso0
Copy link
Member

@ronso0 ronso0 commented Nov 3, 2025

Fixes #14873 and similar symptoms in #14687 for me.
I only understand parts of BaseTrackCache, so I don't know how this can affect the 'dirty tracks' thing in real life.

The issue:

In #14687 tracks pop up in the Computer directory views that use LibraryTableModel.
Same for #14873, unrelated (older) tracks show up in Analyze view.

Root cause:

So called "extra filters" are sent to SearchQueryParser::parseQuery(query, extraFilter) where extraFilter is wrapped as SqlNode.
In BaseTrackCache we add dirty tracks to the current view if they are missing but match the query -- however the extraFilter SqlNode::match(pTrack) always returns true, making the check pointless because it adds dirty tracks even if they don't belong into the view.

Fix:

refine that check and only consider SqlNode::Match() if the extraFilter is empty.

As far as I can tell, Analyze (and #14687) are the only features that make use of the extra filter.
But I'm not sure, so there may be side effects for other library views, too.

@ronso0 ronso0 marked this pull request as ready for review November 3, 2025 14:25
@ronso0 ronso0 added this to the 2.5.4 milestone Nov 3, 2025
@ronso0
Copy link
Member Author

ronso0 commented Nov 3, 2025

As far as I can tell, Analyze (and #14687) are the only features that make use of the extra filter.

If this is true, and we use extraFilter only for _basic_¹ filtering, we could as well

  1. fix the datetime_added filter (this is currently a TextFilterNode, see Search by date_added: add keywords for searching specific range #10759 🙄 )
  2. make extraFilter an OrNode -> parses text input like from searchbar
  3. rework the date added filter in Analyze (date > now - 7 days)
  4. (add a directory filter for use in (feat) Computer feature: use library data model if selected path is watched by library #14687)

¹ basic like use search operators like users do via searchbar

@daschuer
Copy link
Member

daschuer commented Nov 8, 2025

Mabe we can use this bug a kick for a full revamp of the analyser window. I have never used this feature, because it does not match may use cases. "All" is useless (it was a workaround before we had the analysis context menu). "New" the 7 new days are too inflexible, independent form the purpose of Analyzing new Tracks.

How about making it "Inbox"/"Todo" box. Maybe a special playlist?

  • New tracks will automatically entered.
  • Manually removed

Alternative:

  • Show only track with missing analysis data

This fix here is good for the stable 2.5.

Copy link
Member

@daschuer daschuer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes one issue, by introducing another.
Before, dirty tracks appears in the list. Now all dirty tracks disappear, including the tracks that should remain.

If you edit metadata of a track in the Analyser view it disappears from the view.

@ronso0
Copy link
Member Author

ronso0 commented Nov 9, 2025

If you edit metadata of a track in the Analyser view it disappears from the view.

Ah okay, that's what dirty tracks are.

Regarding the Analyze view I'd prefer to move in small steps.
Like finalize #15572 to fix this bug, then work out what's the best way to let users define 'New'.

@ronso0 ronso0 closed this Nov 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ocassionally old tracks show up in Analyze view

2 participants